package com.zhiliang.waibao.myapplication.ui;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.lzy.imagepicker.ImagePicker;
import com.zhiliang.waibao.myapplication.R;
import com.zhiliang.waibao.myapplication.component.ApplicationComponent;
import com.zhiliang.waibao.myapplication.ui.photo.GlideImageLoader;
import com.zhiliang.waibao.myapplication.ui.base.BaseFragment;
import com.zhiliang.waibao.myapplication.ui.photo.WxDemoActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

public class BFragment extends BaseFragment {

    Unbinder unbinder;
    private ImagePicker imagePicker;

    public static BFragment newInstance() {

        Bundle args = new Bundle();

        BFragment fragment = new BFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getContentLayout() {
        return R.layout.module_fragment_b;
    }

    @Override
    public void initInjector(ApplicationComponent appComponent) {

    }

    @Override
    public void bindView(View view, Bundle savedInstanceState) {
        imagePicker = ImagePicker.getInstance();
        imagePicker.setImageLoader(new GlideImageLoader());

    }

    @Override
    public void initData() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
